﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class QueryCarDetailsPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnShow_Click(object sender, EventArgs e)
    {
        QueryWebRef.Service carDetail = new QueryWebRef.Service();
        DataSet ds = carDetail.CarDetails(txtModelNo.Text);
        if (ds.Tables[0].Rows.Count == 0)
        {
            lblMessage.Text = "Model not Avariable!";
        }
        else
        {
            GridView1.DataSource = ds.Tables[0];
            lblMessage.Text = "";
        }
        GridView1.DataBind();
    }
}
